import java.util.Scanner;

public class Login {
    public String name = "abc";
    public int password = 123;

    public    void loginInfo(String name,int password)

        throws PasswordException,UserNameException{
            if (!this.name.equals(name)) {
                throw new UserNameException("用户名错误！");
            }
            if (this.password != password) {
                throw new PasswordException("密码错误！");
            }
            System.out.println("登陆成功");
        }


}

